package com.cec.controller.admin;

import com.cec.result.Result;
import com.cec.service.admin.ActivityService;
import com.cec.service.admin.InfoService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/admin/home")
@Api(tags = "后台首页")
public class HomeController {
    @Autowired
    private InfoService infoService;
    @Autowired
    private ActivityService activityService;

    @GetMapping("/info")
    public Result getHomeInfo(){
        return infoService.getHomeInfo();
    }

    @GetMapping("/activity")
    public Result getHomeActivity(){
        return activityService.getHomeActivity();
    }
}
